package com.bw.fxzk

import com.bw.fxzk.room.Score
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

class ScoreAdapter:BaseQuickAdapter<Score,BaseViewHolder>(R.layout.item) {
    override fun convert(holder: BaseViewHolder, item: Score) {
        holder.setText(R.id.time,item.time)
        if (item.type==0){
            holder.setText(R.id.name,"签到积分")
            holder.setText(R.id.num,"+${item.num}")
        }else{
            holder.setText(R.id.name,"兑换好物")
            holder.setText(R.id.num,"-${item.num}")
        }
    }
}